﻿using System;
using System.Collections.Generic;

using Xamarin.Forms;

namespace CustomControlTest
{
    public partial class MyCustomControl : StackLayout
    {
        public Color TextColor
        {
            get { return this.Text.TextColor; }
            set { this.Text.TextColor = value; }
        }

        public Label TextControl
        {
            get { return this.Text; }
            set { this.Text = value; }
        }

        private bool loggedIn = false;

        public void OnLoginClicked(object sender, EventArgs e) {
            loggedIn = !loggedIn;
            this.Login.Text = loggedIn ? "Logout" : "Login";
        }

        public MyCustomControl()
        {
            InitializeComponent();
        }
    }
}
